iT邦幫忙

2021 iThome 鐵人賽

DAY 25
0

補上缺漏和元素

  • games, economy之類的先補上
@commands.command()
async def sms(self, ctx):
    sms = discord.Embed(title = "指令", 
        description = "忘記了嗎? 來看一下吧~~", color = 0x4599)
    sms.add_field(name = "!ahoy", value = "Ahoy.gif", inline = True)
    sms.add_field(name = "!clear", value = "用 !clear + 數字刪訊息", inline = True)
    sms.add_field(name = "!sms", value = "等於 == !help", inline = True)
    # 補
    sms.add_field(name = "!games", value = "使用!games獲取更多訊息", inline = True)
    sms.add_field(name = "!economy", value = "使用!economy獲取更多訊息", inline = True)
    sms.add_field(name = "!plus", value = "訂單增加", inline = True)
    sms.set_thumbnail(url = "https://www.formula-ai.com/wp-content/uploads/2020/09/python_or_java_meme.jpg")
    await ctx.send(embed = sms) 
  • 補上各自的添加訊息 -- games
# games
@commands.command()
async def games(self, ctx):
    sms = discord.Embed(title = "games", 
        description = "playing games", color = 0x4599)
    sms.add_field(name = "!guess", value = "玩終極密碼,賭注最高可下達至240", inline = True)
    sms.set_thumbnail(url = "https://www.formula-ai.com/wp-content/uploads/2020/09/python_or_java_meme.jpg")
    await ctx.send(embed = sms) 
  • 補上各自的添加訊息 -- economy
# economy
@commands.command()
async def economy(self, ctx):
    sms = discord.Embed(title = "economy", 
        description = "command統整", color = 0x4599)
    sms.add_field(name = "!bag", value = "查看包包", inline = True)
    sms.add_field(name = "!beg", value = "討錢", inline = True)
    sms.add_field(name = "!buy", value = "買東西", inline = True)
    sms.add_field(name = "!slots", value = "賭博", inline = True)
    sms.add_field(name = "!money", value = "查看自己的戶頭", inline = True)
    sms.add_field(name = "!market", value = "查看市場", inline = True)
    sms.set_thumbnail(url = "https://www.formula-ai.com/wp-content/uploads/2020/09/python_or_java_meme.jpg")
    await ctx.send(embed = sms) 

接下來......

  • 武們先使用MongoDB來取代Json......

上一篇
小物件實作
下一篇
使用MongoDB -- 資料庫簡易上手
系列文
Discord-bot,從0開始到做出一個機器人30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言